1. Field of the Invention
Apparatuses and methods consistent with exemplary embodiments relate to an image scanning apparatus, an image compensation method, and a computer-readable recording medium, and more particularly, to an image scanning apparatus capable of reading a scanned image in block units and compensating the scanned image using a low capacity of buffer, an image compensation method, and a computer-readable recording medium.
2. Description of the Related Art
In general, image scanning apparatuses are apparatuses which scan original images such as texts, pictures, or films and convert the scanned image into digital data. The digital data may be displayed on a monitor of a computer or printed by the printer and generated as an output image. As an example of the image scanning apparatuses, there are scanners, copiers, facsimiles, multiple function peripherals (MFPs) configured to multiply implement functions thereof through one apparatus.
In the image scanning apparatuses, a paper may be twistedly input due to mechanical characteristics and thus a skew in which the scanned image is rotated may caused. Since an image undesired by a user is scanned or copied and the user feels uncomfortable when the image is rotated, current image scanning apparatuses have the skew compensation function.
Specifically, the skew may be compensated through an operation using the following Equation 1.
                              (                                                                      x                  2                                                                                                      y                  2                                                              )                =                                            (                                                                                          cos                      ⁢                                                                                          ⁢                      θ                                                                                                  sin                      ⁢                                                                                          ⁢                      θ                                                                                                                                                          -                        sin                                            ⁢                                                                                          ⁢                      θ                                                                                                  cos                      ⁢                                                                                          ⁢                      θ                                                                                  )                        ⁢                          (                                                                                                                  x                        1                                            -                                              x                        c                                                                                                                                                                                y                        1                                            -                                              y                        c                                                                                                        )                                +                      (                                                                                x                    c                                                                                                                    y                    c                                                                        )                                              [                  Equation          ⁢                                          ⁢          1                ]            
Here, θ is a rotation angle, x is a position in a column direction, y is a position in a row direction, (xc, yc) is a center point, (x1, y1) is a source position, and (x2, y2) is a target position.
A coordinate (x2, y2) position-adjusted through Equation 1 described above may have a real value. A pixel value corresponding an integer value of the coordinate (x2, y2) having the real value may be obtain through interpolation using neighboring pixel values of a source image.
However, it is ineffective when a required pixel is read from a main memory, in which the source image is stored, to calculate a target pixel in terms of a bandwidth of a bus. In the related art, to solve the issue, a line memory buffer is included and used to store a small amount of line data of the source image. For example, in A4-size paper of 600 dot per inch (DPI), data of about 5 Kbyte is necessary with respect to one line per mono one channel.
However, when the skew is compensated as described above, the capacity of the line memory buffer has to be increased according to a skew angle. For example, the image is rotated in an angle range of −1 degree to 1 degree, the line memory buffer needs 60 lines. The number of pixels necessary for an operation is increased according to complexity of the interpolation and the capacity of the line memory buffer has to be increased as the resolution of an image to be processed is increased.